package com.tuniu.agents.common.command.action;

import com.tuniu.agents.command.action.OutputTextAction;

import java.util.Map;

/**
 * Default implementation of OutputTextAction that handles text output.
 * This class is responsible for retrieving and returning a message from parameters.
 */
public class DefaultOutputTextAction extends OutputTextAction {

    /**
     * Key used to retrieve the message from parameters
     */
    public static final String KEY_MESSAGE = "message";

    @Override
    public String execute(String input, Map<String, Object> params, Map<String, Object> context) {
        return params.get(KEY_MESSAGE).toString();
    }

}
